#if !defined(AFX_MANUALROBOT_H__DD457CEA_39A2_4578_B6D6_1F31E7A04FCC__INCLUDED_)
#define AFX_MANUALROBOT_H__DD457CEA_39A2_4578_B6D6_1F31E7A04FCC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ManualRobot.h : header file
//

#include "Util\MinButton.h"
#include "Util\MinLabel.h"

// Control Layer
class IRobotBuffer;
// Process Layer
class IAutoManager;
class ITrsRobotBuffer;
// Common Layer
class CDMControlCenter;
class CErrorCodeData;
class CSystemData;

/////////////////////////////////////////////////////////////////////////////
// CManualRobot dialog

class CManualRobot : public CDialog 
{
// Construction
private:

	IAutoManager* m_lnkAutoManager;
	ITrsRobotBuffer * m_lnkTrsRobotBuffer;
	IRobotBuffer* m_lnkRobotBuffer;

	CErrorCodeData* m_lnkErrorCodeData;
	CSystemData* m_lnkSystemData;
	void ErrorDisplay(int nErrorCode);
	BOOL m_bErrorDisplay;

public:
	UINT m_TimerID;
	BOOL m_TimerInitFlag;

	CManualRobot(IAutoManager* pAM,CDMControlCenter* pDMCC,CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CManualRobot)
	enum { IDD = IDD_MANUAL_ROBOT };
	CMinButton	m_bWaferTurnReadyPos;
	CMinButton	m_bWaferTurnPos;
	CMinButton	m_bRobotTurnToTable;
	CMinButton	m_bRobotAlignToTurn;
	CMinButton	m_bRobotTbToLp;
	CMinButton	m_bRobotPutTable;
	CMinButton	m_bRobotPutLP;
	CMinButton	m_bRobotPutAlign;
	CMinButton	m_bRobotLpToAl;
	CMinButton	m_bRobotGetTable;
	CMinButton	m_bRobotGetLP;
	CMinButton	m_bRobotGetAlign;
	CMinButton	m_bRobotAlToTB;
	CMinButton	m_bWaferVacuumOn;
	CMinButton	m_bWaferVacuumOff;
	CMinButton	m_bWaferUnloadingReadyPos;
	CMinButton	m_bWaferUnloadingPos;
	CMinButton	m_bWaferTableReadyPos;
	CMinButton	m_bWaferTablePos;
	CMinButton	m_bWaferLoadingReadyPos;
	CMinButton	m_bWaferLoadingPos;
	CMinButton	m_bWaferAlignReadyPos;
	CMinButton	m_bWaferAlignPos;
	CMinButton	m_bExit;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CManualRobot)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	char m_cBufGet[50];
	char m_cbuf[50];

	void ButtonInitial();
	void ButtonUpdate();
	// Generated message map functions
	//{{AFX_MSG(CManualRobot)
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnDestroy();
	afx_msg void OnExit();
	afx_msg void OnWaferLoadingReadyPos();
	afx_msg void OnWaferLoadingPos();
	afx_msg void OnWaferAlignReadyPos();
	afx_msg void OnWaferAlignPos();
	afx_msg void OnWaferTableReadyPos();
	afx_msg void OnWaferTablePos();
	afx_msg void OnWaferUnloadingReadyPos();
	afx_msg void OnWaferUnloadingPos();
	afx_msg void OnWaferVacuumOn();
	afx_msg void OnWaferVacuumOff();
	afx_msg void OnRobotGetLp();
	afx_msg void OnRobotPutLp();
	afx_msg void OnRobotGetAlign();
	afx_msg void OnRobotPutAlign();
	afx_msg void OnRobotGetTable();
	afx_msg void OnRobotPutTable();
	afx_msg void OnRobotLpToAl();
	afx_msg void OnRobotAlToTb();
	afx_msg void OnRobotTbToLp();
	afx_msg void OnWaferTurnReadyPos();
	afx_msg void OnWaferTurnPos();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MANUALROBOT_H__DD457CEA_39A2_4578_B6D6_1F31E7A04FCC__INCLUDED_)
